﻿@model AppStore.Models.CartIndexViewModel

@{
    ViewBag.Title = "Koszyk";
}

<h2>Koszyk</h2>

<table align="center">
    <thead>
        <tr>
                  <th align="center">Nazwa</th>
                  <th align="center">Cena</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var line in Model.Cart.Lines)
        {
            <tr>
                <td align="center">@line.name</td>
                <td align="center">@line.price</td>
                <td>
                @using (Html.BeginForm("RemoveFromCart","Cart"))
                {
                     @Html.Hidden("applicationId",line.applicationId)
                     @Html.Hidden("returnUrl", Request.Url.PathAndQuery)
                     <input type="submit" value="Usuń z koszyka"/>
                }
                </td>
            </tr>
        }
    </tbody>
</table>
